package com.zjff.myshop.admin.pojo.form;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
public class HomeQueryPageForm {
    @NotNull(message = "page不能为空 ")
    @Min(value = 1, message = "page不能小于1 ")
    @ApiModelProperty(value = "页码", position = 1, required = true)
    private Integer page;

    @NotNull(message = "limit不能为空 ")
    @Range(min = 5, max = 50, message = "limit必须在5~50之间 ")
    @ApiModelProperty(value = "每页记录数", position = 2, required = true)
    private Integer limit;

    @ApiModelProperty(value = "分类Id(1轮播/2为你推荐/3新品上线/ 4热销商品) ", position = 3, required = true)
    @NotNull(message = "typeId不能为空 ")
    private Integer typeId;
}
